package com.wandian.news.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wandian.news.R;
import com.wandian.news.bean.KnowledgeCYDGBean;


/**
 * @author Administrator
 * @date 2019/12/16-13:32
 * @description 适配器
 **/
public class KnowledgeCYDGRecycleAdapter extends BaseQuickAdapter<KnowledgeCYDGBean.NewslistEntity, BaseViewHolder> {

    public KnowledgeCYDGRecycleAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper,KnowledgeCYDGBean.NewslistEntity item) {
        TextView tv_chengyu = helper.getView(R.id.tv_chengyu);
        tv_chengyu.setText("成语："+item.getChengyu());
        TextView pinyin = helper.getView(R.id.tv_pinyin);
        pinyin.setText("拼音："+item.getPinyin());
        TextView diangu = helper.getView(R.id.tv_diangu);
        diangu.setText("典故："+item.getDiangu());
        TextView chuchu = helper.getView(R.id.tv_chuchu);
        chuchu.setText("出处："+item.getChuchu());
        TextView fanli = helper.getView(R.id.tv_fanli);
        fanli.setText("范例："+item.getFanli());
    }
}
